package pattern.builder

/**
  * 创建器的第二种实现
  */
class ConcreteBuilderB extends Builder{
   private val product = new Product()

   override def builderComponent1(): Unit = {
     product.component1 = "component1 from ConcreteBuilderB"
   }

   override def builderComponent2(): Unit = {
     product.component2 = "component1 from ConcreteBuilderB"
   }

   override def builderProduct() = product
 }
